package com.baige.service.user.entity;

import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 账户明细
 * </p>
 *
 * @author wulg
 * @since 2018-12-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_account_item")
public class UserAccountItem extends Model<UserAccountItem> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;
    /**
     * 账户id
     */
    @TableField("account_id")
    private String accountId;
    /**
     * 订单编号
     */
    @TableField("order_code")
    private String orderCode;
    /**
     * 支付总金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;
    /**
     * 可用金额
     */
    @TableField("usable_amount")
    private BigDecimal usableAmount;
    /**
     * 支付的押金金额
     */
    @TableField("frozen_amount")
    private BigDecimal frozenAmount;
    /**
     * 支付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 已提现金额
     */
    @TableField("cash_out_amount")
    private BigDecimal cashOutAmount;
    /**
     * 消费金额
     */
    @TableField("consume_amount")
    private BigDecimal consumeAmount;
    /**
     * 提现冻结金额
     */
    @TableField("cash_out_frozen_amount")
    private BigDecimal cashOutFrozenAmount;
    /**
     * 支付类型
     */
    @TableField("pay_type")
    private Integer payType;
    /**
     * 退款状态(1.退款失败  2.退款成功)
     */
    @TableField("refund_status")
    private Integer refundStatus;
    /**
     * 版本
     */
    private Integer version;
    /**
     * 修改时间
     */
    @TableField("modify_time")
    private Date modifyTime;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
